<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('系统校验规则列表')" />
</head>
<body class="gray-bg">
	<div class="container-div">
		<div class="row">
			<!-- <div class="col-sm-12 search-collapse">
				
			</div> -->
			<form id="gen-form">
				<div class="select-list">
					<ul>
						<li><input id="sysId" name="sysId" th:value="${sysId}"
							type="hidden" /></li>
					</ul>
				</div>
			</form>
			<div class="col-sm-12 select-table table-striped">
				<table id="fieldRuleDialogTable"></table>
			</div>
		</div>
	</div>
	<th:block th:include="include :: footer" />
	<script th:inline="javascript">
        var prefix = ctx + "verify/task";
        var ruleTypeDatas = [[${@dict.getType('rule_type')}]];

        $(function() {debugger;
            var options = {
            	id : "fieldRuleDialogTable"	,
                url: prefix + "/showFieldRoleListBySysId",
                sortName: "createTime",
		        sortOrder: "desc",
		        showExport: false,
		        singleSelect:false,
		        showSearch: false,
		        showRefresh: false,
		        showToggle: false,
		        showColumns: false,
		        clickToSelect: true,
		        rememberSelected: true,
                modalName: "系统校验规则列表",
                columns: [{
                    checkbox: true,
                    visible :false
                },
                {
                    field: 'checkRuleId',
                    title: '检核规则id',
                    visible: false
                },
                {
                    field: 'sysCode',
                    title: '系统代码'
                },
                {
                    field: 'sysName',
                    title: '系统名称'
                },
                {
                    field: 'moduleCode',
                    title: '功能模块代码'
                },
                {
                    field: 'moduleName',
                    title: '功能模块名称'
                },
                {
                    field: 'tableCode',
                    title: '表代码'
                },
                {
                    field: 'tableName',
                    title: '表名称'
                },
                {
                    field: 'fieldCode',
                    title: '字段代码'
                },
                {
                    field: 'fieldName',
                    title: '字段名称'
                },
                {
                    field: 'fieldType',
                    title: '字段类型'
                },
                {
                    field: 'ruleType',
                    title: '规则类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(ruleTypeDatas, value);
                    }
                },
                {
                    field: 'fieldRemark',
                    title: '字段说明'
                },
               {
                    field: 'rule',
                    title: '规则'
                },
                {
                    field: 'ruleRemark',
                    title: '规则说明'
                },]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>
